#!/usr/bin/python
# -*- coding: UTF-8 -*-
def rgb(num1,num2,num3):
    l = []
    l.append(num1)
    l.append(num2)
    l.append(num3)
    for i in range(3):
        if l[i]>255:
            l[i] = 255
        if l[i]<0:
            l[i] = 0
    return '{:X}{:X}{:X}'.format(l[0],l[1],l[2])

print rgb(-1,255,256)